Putting Multiple Movies on a Page
Sometimes you want to put multiple QuickTime movies on a single Web page. This presents a problem. Like most problems, there's a way to solve it that's simple, obvious, and wrong:
<EMBED SRC="HugeMovie1.mov" HEIGHT=136 WIDTH=160> <BR>
<EMBED SRC="HugeMovie2.mov" HEIGHT=136 WIDTH=160> <BR>
<EMBED SRC="HugeMovie3.mov" HEIGHT=136 WIDTH=160>
Don't do this. If you put multiple movies on your Web page using multiple <EMBED> tags you'll run into the following problems:
- Every <EMBED> tag on the page loads a copy of the plug-in, which requires its own block of memory. It adds up.
- All the movies download at once, right along with your Web page. It takes forever.
- All the movies try to load into memory at once. Oops.
To see an example of this approach, load MultiMovie1.htm (in the SpecialDelivery folder on the CD).
You might use this approach successfully for a page with a few small movies or in a controlled environment--two or three short audio loops, for example, or short movie clips on an intranet page for users with a known amount of RAM.
For pages with several large movies or MP3 files, delivered over the Internet, this is a recipe for trouble.
Fortunately, there are other solutions. You can use poster movies, target the movies to QuickTime Player, target the movies to a common frame or window, or you can use a little JavaScript.
Poster movies are described in Making a Poster Movie and Click Here, Play There . To embed multiple poster movies on a page, try this:
<EMBED SRC="Poster1.mov" HREF="HugeMovie1.mov" TARGET="myself"
HEIGHT=136 WIDTH=160> <BR>
<EMBED SRC="Poster2.mov" HREF="HugeMovie2.mov" TARGET="myself"
HEIGHT=136 WIDTH=160> <BR>
<EMBED SRC="Poster3.mov" HREF="HugeMovie3.mov" TARGET="myself"
HEIGHT=136 WIDTH=160> <BR>
This still loads multiple copies of the plug-in, but each copy initially shows an image rather than a whole movie. This shortens the load time for your page and doesn't require a lot of RAM initially.
To see an example of this approach, load MultiMovie2.htm (in the SpecialDelivery folder on the CD). It's shown on the next page.
Unfortunately, each movie loads into RAM when the user clicks a poster and continues to use RAM after it's done playing. After the second or third movie, there may not be enough RAM to play any others, and there's no easy way for the user to close the open movies.
You can get around this by having each movie turn back into a poster when it finishes. You do this by embedding a QTNEXT statement into the actual movie (not the poster movie) using Plug-in Helper:
QTNEXT1="<Poster.mov> T<myself>"
where <Poster.mov> specifies the poster for that movie.
Embedding parameters in a movie using Plug-in Helper is described in Plug-in Helper . You'll probably want to add a CONTROLLER="False" statement to each poster movie using Plug-in Helper as well:
To see an example of this approach, load MultiMovie3.htm (in the SpecialDelivery folder on the CD)
|